﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HotelManagement._03.DAO;
using System.Data;
using HotelManagement._04.OBJECT;

namespace HotelManagement._02.BUS
{
    class CustomerManagerBUS
    {
        CustomerManagerDAO m_CustomerManager = new CustomerManagerDAO();
        public DataTable ViewAll()
        {
            return m_CustomerManager.ViewAll("pr_tblCustomer_SelectAll");
        }
        public DataTable ViewAllCustomerType()
        {
            return m_CustomerManager.ViewAll("pr_tblCustomerType_SelectAll");
        }
        public bool UpdateCustomer(Customer customer)
        {
            return m_CustomerManager.Update(customer, "pr_tblCustomer_Update");
        }
        public DataTable InsertCustomer(Customer customer)
        {
            return m_CustomerManager.Insert(customer, "pr_tblCustomer_Insert");
        }
        public bool DeleteCustomer(Customer customer)
        {
            return m_CustomerManager.Delete(customer, "pr_tblCustomer_DeleteRow");
        }
        public bool FindByPassport(Customer customer)
        {
            return m_CustomerManager.Find(customer, "pr_tblCustomer_FindByPassport");
        }
        public DataTable Search(Customer customer)
        {
            return m_CustomerManager.Search(customer, "pr_tblCustomer_SearchCustomerByName");
        }
    }
}
